home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 April: Mac OS SDK / Dev.CD Apr 97 SDK1.toast / Development Kits (Disc 1) / Interfaces&Libraries / Interfaces / AIncludes / FileTransfers.a < prev    next >
Encoding:
Text File  |  1996-01-24  |  9.2 KB  |  392 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        FileTransfers.a
  3. ;
  4. ;    Contains:    CommToolbox File Transfer Manager Interfaces.
  5. ;
  6. ;    Version:    Technology:    System 7.5
  7. ;                Package:    Universal Interfaces 2.2 in “MPW” on ETO #20
  8. ;
  9. ;    Copyright:    © 1984-1995 by Apple Computer, Inc.
  10. ;                All rights reserved.
  11. ;
  12. ;    Bugs?:        If you find a problem with this file, use the Apple Bug Reporter
  13. ;                stack.  Include the file and version information (from above)
  14. ;                in the problem description and send to:
  15. ;                    Internet:    apple.bugs@applelink.apple.com
  16. ;                    AppleLink:    APPLE.BUGS
  17. ;
  18. ;
  19.  
  20.     IF &TYPE('__FILETRANSFERS__') = 'UNDEFINED' THEN
  21. __FILETRANSFERS__ SET 1
  22.  
  23.  
  24.     IF &TYPE('__WINDOWS__') = 'UNDEFINED' THEN
  25.     include 'Windows.a'
  26.     ENDIF
  27. ;        include 'Types.a'                                            ;
  28. ;            include 'ConditionalMacros.a'                            ;
  29. ;        include 'Memory.a'                                            ;
  30. ;            include 'MixedMode.a'                                    ;
  31. ;        include 'Quickdraw.a'                                        ;
  32. ;            include 'QuickdrawText.a'                                ;
  33. ;        include 'Events.a'                                            ;
  34. ;            include 'OSUtils.a'                                    ;
  35. ;        include 'Controls.a'                                        ;
  36. ;            include 'Menus.a'                                        ;
  37.  
  38.     IF &TYPE('__CTBUTILITIES__') = 'UNDEFINED' THEN
  39.     include 'CTBUtilities.a'
  40.     ENDIF
  41. ;        include 'Dialogs.a'                                        ;
  42. ;            include 'Errors.a'                                        ;
  43. ;            include 'TextEdit.a'                                    ;
  44. ;        include 'StandardFile.a'                                    ;
  45. ;            include 'Files.a'                                        ;
  46. ;                include 'Finder.a'                                    ;
  47. ;        include 'AppleTalk.a'                                        ;
  48.  
  49.     IF &TYPE('__CONNECTIONS__') = 'UNDEFINED' THEN
  50.     include 'Connections.a'
  51.     ENDIF
  52.  
  53.     IF &TYPE('__FILES__') = 'UNDEFINED' THEN
  54.     include 'Files.a'
  55.     ENDIF
  56.  
  57.     IF &TYPE('__TERMINALS__') = 'UNDEFINED' THEN
  58.     include 'Terminals.a'
  59.     ENDIF
  60.  
  61. ; current file transfer manager version    
  62. curFTVersion                    EQU        2
  63. ; FTErr    
  64. ftGenericError                    EQU        -1
  65. ftNoErr                            EQU        0
  66. ftRejected                        EQU        1
  67. ftFailed                        EQU        2
  68. ftTimeOut                        EQU        3
  69. ftTooManyRetry                    EQU        4
  70. ftNotEnoughDSpace                EQU        5
  71. ftRemoteCancel                    EQU        6
  72. ftWrongFormat                    EQU        7
  73. ftNoTools                        EQU        8
  74. ftUserCancel                    EQU        9
  75. ftNotSupported                    EQU        10
  76.  
  77. ; typedef OSErr             FTErr
  78.  
  79. ftIsFTMode                        EQU        1 << 0
  80. ftNoMenus                        EQU        1 << 1
  81. ftQuiet                            EQU        1 << 2
  82. ftConfigChanged                    EQU        1 << 4
  83. ftSucc                            EQU        1 << 7
  84.  
  85. ; typedef unsigned long     FTFlags
  86.  
  87. ftSameCircuit                    EQU        1 << 0
  88. ftSendDisable                    EQU        1 << 1
  89. ftReceiveDisable                EQU        1 << 2
  90. ftTextOnly                        EQU        1 << 3
  91. ftNoStdFile                        EQU        1 << 4
  92. ftMultipleFileSend                EQU        1 << 5
  93.  
  94. ; typedef unsigned short     FTAttributes
  95.  
  96. ftReceiving                        EQU        0
  97. ftTransmitting                    EQU        1
  98.  
  99. ; typedef unsigned short     FTDirection
  100. ;    application routines type definitions 
  101. ; typedef struct FTRecord     FTRecord, *FTPtr, **FTHandle
  102. FTRecord                 RECORD    0
  103. procID                     ds.w   1        ; offset: $0 (0)
  104. flags                     ds.l   1        ; offset: $2 (2)
  105. errCode                     ds.w   1        ; offset: $6 (6)
  106. refCon                     ds.l   1        ; offset: $8 (8)
  107. userData                 ds.l   1        ; offset: $C (12)
  108. defProc                     ds.l   1        ; offset: $10 (16)
  109. config                     ds.l   1        ; offset: $14 (20)
  110. oldConfig                 ds.l   1        ; offset: $18 (24)
  111. environsProc             ds.l   1        ; offset: $1C (28)
  112. reserved1                 ds.l   1        ; offset: $20 (32)
  113. reserved2                 ds.l   1        ; offset: $24 (36)
  114. ftPrivate                 ds.l   1        ; offset: $28 (40)
  115. sendProc                 ds.l   1        ; offset: $2C (44)
  116. recvProc                 ds.l   1        ; offset: $30 (48)
  117. writeProc                 ds.l   1        ; offset: $34 (52)
  118. readProc                 ds.l   1        ; offset: $38 (56)
  119. owner                     ds.l   1        ; offset: $3C (60)
  120. direction                 ds.w   1        ; offset: $40 (64)
  121. theReply                 ds     SFReply    ; offset: $42 (66)
  122. writePtr                 ds.l   1        ; offset: $8C (140)
  123. readPtr                     ds.l   1        ; offset: $90 (144)
  124. theBuf                     ds.l   1        ; offset: $94 (148)
  125. bufSize                     ds.l   1        ; offset: $98 (152)
  126. autoRec                     ds.l   64        ; offset: $9C (156)
  127. attributes                 ds.w   1        ; offset: $19C (412)
  128. sizeof                     EQU *            ; size:   $19E (414)
  129.                         ENDR
  130.  
  131.  
  132. ; FTReadProc messages 
  133. ftReadOpenFile                    EQU        0                    ; count = forkFlags, buffer = pblock from PBGetFInfo 
  134. ftReadDataFork                    EQU        1
  135. ftReadRsrcFork                    EQU        2
  136. ftReadAbort                        EQU        3
  137. ftReadComplete                    EQU        4
  138. ftReadSetFPos                    EQU        6                    ; count = forkFlags, buffer = pBlock same as PBSetFPos 
  139. ftReadGetFPos                    EQU        7                    ; count = forkFlags, buffer = pBlock same as PBGetFPos 
  140. ; FTWriteProc messages 
  141. ftWriteOpenFile                    EQU        0                    ; count = forkFlags, buffer = pblock from PBGetFInfo 
  142. ftWriteDataFork                    EQU        1
  143. ftWriteRsrcFork                    EQU        2
  144. ftWriteAbort                    EQU        3
  145. ftWriteComplete                    EQU        4
  146. ftWriteFileInfo                    EQU        5
  147. ftWriteSetFPos                    EQU        6                    ; count = forkFlags, buffer = pBlock same as PBSetFPos 
  148. ftWriteGetFPos                    EQU        7                    ; count = forkFlags, buffer = pBlock same as PBGetFPos 
  149. ;    fork flags 
  150. ftOpenDataFork                    EQU        1
  151. ftOpenRsrcFork                    EQU        2
  152.  
  153. ;
  154. ; pascal FTErr InitFT(void)
  155. ;
  156.     IF GENERATINGCFM THEN
  157.         IMPORT_CFM_FUNCTION    InitFT
  158.     ENDIF
  159.  
  160. ;
  161. ; pascal Handle FTGetVersion(FTHandle hFT)
  162. ;
  163.     IF GENERATINGCFM THEN
  164.         IMPORT_CFM_FUNCTION    FTGetVersion
  165.     ENDIF
  166.  
  167. ;
  168. ; pascal short FTGetFTVersion(void)
  169. ;
  170.     IF GENERATINGCFM THEN
  171.         IMPORT_CFM_FUNCTION    FTGetFTVersion
  172.     ENDIF
  173.  
  174. ;
  175. ; pascal FTHandle FTNew(short procID, FTFlags flags, FileTransferSendUPP sendProc, FileTransferReceiveUPP recvProc, FileTransferReadUPP readProc, FileTransferWriteUPP writeProc, FileTransferEnvironsUPP environsProc, WindowPtr owner, long refCon, long userData)
  176. ;
  177.     IF GENERATINGCFM THEN
  178.         IMPORT_CFM_FUNCTION    FTNew
  179.     ENDIF
  180.  
  181. ;
  182. ; pascal void FTDispose(FTHandle hFT)
  183. ;
  184.     IF GENERATINGCFM THEN
  185.         IMPORT_CFM_FUNCTION    FTDispose
  186.     ENDIF
  187.  
  188. ;
  189. ; pascal FTErr FTStart(FTHandle hFT, FTDirection direction, const SFReply *fileInfo)
  190. ;
  191.     IF GENERATINGCFM THEN
  192.         IMPORT_CFM_FUNCTION    FTStart
  193.     ENDIF
  194.  
  195. ;
  196. ; pascal FTErr FTAbort(FTHandle hFT)
  197. ;
  198.     IF GENERATINGCFM THEN
  199.         IMPORT_CFM_FUNCTION    FTAbort
  200.     ENDIF
  201.  
  202. ;
  203. ; pascal FTErr FTSend(FTHandle hFT, short numFiles, FSSpecArrayPtr pFSSpec, FileTransferNotificationUPP notifyProc)
  204. ;
  205.     IF GENERATINGCFM THEN
  206.         IMPORT_CFM_FUNCTION    FTSend
  207.     ENDIF
  208.  
  209. ;
  210. ; pascal FTErr FTReceive(FTHandle hFT, FSSpecPtr pFSSpec, FileTransferNotificationUPP notifyProc)
  211. ;
  212.     IF GENERATINGCFM THEN
  213.         IMPORT_CFM_FUNCTION    FTReceive
  214.     ENDIF
  215.  
  216. ;
  217. ; pascal void FTExec(FTHandle hFT)
  218. ;
  219.     IF GENERATINGCFM THEN
  220.         IMPORT_CFM_FUNCTION    FTExec
  221.     ENDIF
  222.  
  223. ;
  224. ; pascal void FTActivate(FTHandle hFT, Boolean activate)
  225. ;
  226.     IF GENERATINGCFM THEN
  227.         IMPORT_CFM_FUNCTION    FTActivate
  228.     ENDIF
  229.  
  230. ;
  231. ; pascal void FTResume(FTHandle hFT, Boolean resume)
  232. ;
  233.     IF GENERATINGCFM THEN
  234.         IMPORT_CFM_FUNCTION    FTResume
  235.     ENDIF
  236.  
  237. ;
  238. ; pascal Boolean FTMenu(FTHandle hFT, short menuID, short item)
  239. ;
  240.     IF GENERATINGCFM THEN
  241.         IMPORT_CFM_FUNCTION    FTMenu
  242.     ENDIF
  243.  
  244. ;
  245. ; pascal short FTChoose(FTHandle *hFT, Point where, FileTransferChooseIdleUPP idleProc)
  246. ;
  247.     IF GENERATINGCFM THEN
  248.         IMPORT_CFM_FUNCTION    FTChoose
  249.     ENDIF
  250.  
  251. ;
  252. ; pascal void FTEvent(FTHandle hFT, const EventRecord *theEvent)
  253. ;
  254.     IF GENERATINGCFM THEN
  255.         IMPORT_CFM_FUNCTION    FTEvent
  256.     ENDIF
  257.  
  258. ;
  259. ; pascal Boolean FTValidate(FTHandle hFT)
  260. ;
  261.     IF GENERATINGCFM THEN
  262.         IMPORT_CFM_FUNCTION    FTValidate
  263.     ENDIF
  264.  
  265. ;
  266. ; pascal void FTDefault(Ptr *theConfig, short procID, Boolean allocate)
  267. ;
  268.     IF GENERATINGCFM THEN
  269.         IMPORT_CFM_FUNCTION    FTDefault
  270.     ENDIF
  271.  
  272. ;
  273. ; pascal Handle FTSetupPreflight(short procID, long *magicCookie)
  274. ;
  275.     IF GENERATINGCFM THEN
  276.         IMPORT_CFM_FUNCTION    FTSetupPreflight
  277.     ENDIF
  278.  
  279. ;
  280. ; pascal void FTSetupSetup(short procID, const void *theConfig, short count, DialogPtr theDialog, long *magicCookie)
  281. ;
  282.     IF GENERATINGCFM THEN
  283.         IMPORT_CFM_FUNCTION    FTSetupSetup
  284.     ENDIF
  285.  
  286. ;
  287. ; pascal Boolean FTSetupFilter(short procID, const void *theConfig, short count, DialogPtr theDialog, EventRecord *theEvent, short *theItem, long *magicCookie)
  288. ;
  289.     IF GENERATINGCFM THEN
  290.         IMPORT_CFM_FUNCTION    FTSetupFilter
  291.     ENDIF
  292.  
  293. ;
  294. ; pascal void FTSetupItem(short procID, const void *theConfig, short count, DialogPtr theDialog, short *theItem, long *magicCookie)
  295. ;
  296.     IF GENERATINGCFM THEN
  297.         IMPORT_CFM_FUNCTION    FTSetupItem
  298.     ENDIF
  299.  
  300. ;
  301. ; pascal void FTSetupXCleanup(short procID, const void *theConfig, short count, DialogPtr theDialog, Boolean OKed, long *magicCookie)
  302. ;
  303.     IF GENERATINGCFM THEN
  304.         IMPORT_CFM_FUNCTION    FTSetupXCleanup
  305.     ENDIF
  306.  
  307. ;
  308. ; pascal void FTSetupPostflight(short procID)
  309. ;
  310.     IF GENERATINGCFM THEN
  311.         IMPORT_CFM_FUNCTION    FTSetupPostflight
  312.     ENDIF
  313.  
  314. ;
  315. ; pascal Ptr FTGetConfig(FTHandle hFT)
  316. ;
  317.     IF GENERATINGCFM THEN
  318.         IMPORT_CFM_FUNCTION    FTGetConfig
  319.     ENDIF
  320.  
  321. ;
  322. ; pascal short FTSetConfig(FTHandle hFT, const void *thePtr)
  323. ;
  324.     IF GENERATINGCFM THEN
  325.         IMPORT_CFM_FUNCTION    FTSetConfig
  326.     ENDIF
  327.  
  328. ;
  329. ; pascal OSErr FTIntlToEnglish(FTHandle hFT, const void *inputPtr, Ptr *outputPtr, short language)
  330. ;
  331.     IF GENERATINGCFM THEN
  332.         IMPORT_CFM_FUNCTION    FTIntlToEnglish
  333.     ENDIF
  334.  
  335. ;
  336. ; pascal OSErr FTEnglishToIntl(FTHandle hFT, const void *inputPtr, Ptr *outputPtr, short language)
  337. ;
  338.     IF GENERATINGCFM THEN
  339.         IMPORT_CFM_FUNCTION    FTEnglishToIntl
  340.     ENDIF
  341.  
  342. ;
  343. ; pascal void FTGetToolName(short procID, Str255 name)
  344. ;
  345.     IF GENERATINGCFM THEN
  346.         IMPORT_CFM_FUNCTION    FTGetToolName
  347.     ENDIF
  348.  
  349. ;
  350. ; pascal short FTGetProcID(ConstStr255Param name)
  351. ;
  352.     IF GENERATINGCFM THEN
  353.         IMPORT_CFM_FUNCTION    FTGetProcID
  354.     ENDIF
  355.  
  356. ;
  357. ; pascal void FTSetRefCon(FTHandle hFT, long refCon)
  358. ;
  359.     IF GENERATINGCFM THEN
  360.         IMPORT_CFM_FUNCTION    FTSetRefCon
  361.     ENDIF
  362.  
  363. ;
  364. ; pascal long FTGetRefCon(FTHandle hFT)
  365. ;
  366.     IF GENERATINGCFM THEN
  367.         IMPORT_CFM_FUNCTION    FTGetRefCon
  368.     ENDIF
  369.  
  370. ;
  371. ; pascal void FTSetUserData(FTHandle hFT, long userData)
  372. ;
  373.     IF GENERATINGCFM THEN
  374.         IMPORT_CFM_FUNCTION    FTSetUserData
  375.     ENDIF
  376.  
  377. ;
  378. ; pascal long FTGetUserData(FTHandle hFT)
  379. ;
  380.     IF GENERATINGCFM THEN
  381.         IMPORT_CFM_FUNCTION    FTGetUserData
  382.     ENDIF
  383.  
  384. ;
  385. ; pascal void FTGetErrorString(FTHandle hFT, short id, Str255 errMsg)
  386. ;
  387.     IF GENERATINGCFM THEN
  388.         IMPORT_CFM_FUNCTION    FTGetErrorString
  389.     ENDIF
  390.  
  391.     ENDIF ; __FILETRANSFERS__
  392.